<%--
  Created by IntelliJ IDEA.
  User: 28797
  Date: 2022/10/21
  Time: 11:56
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>长租</title>
    <link rel="stylesheet" href="../css/long_time.css">
    <link rel="stylesheet" href="../css/head_daohang.css">
    <link rel="stylesheet" href="../layui/css/layui.css">
    <script src="../js/jquery-3.6.0.min.js"></script>
</head>
<body>
<!-- 头部导航 -->
<div id="head">
    <div class="layui-col-md2">
        <div class="grid-demo ">
            <div class="head-logo"></div>
        </div>
    </div>
    <div class="layui-col-md2">
        <div class="grid-demo head-demo"><a href="${pageContext.request.contextPath}/index.jsp" class="word-1">首页</a></div>
    </div>
    <div class="layui-col-md2">
        <div class="grid-demo head-demo"><a href="${pageContext.request.contextPath}/vehicle/vehicle_screening.jsp" class="head-hover word-1">自驾租车</a>
        </div>
    </div>
    <%--    <div class="layui-col-md1">--%>
    <%--        <div class="grid-demo head-demo"><a href="${pageContext.request.contextPath}/long_time_older/long_time.jsp" class="head-hover word-1">长租专区</a>--%>
    <%--        </div>--%>
    <%--    </div>--%>
    <div class="layui-col-md2">
        <div class="grid-demo head-demo"><a href=" ${pageContext.request.contextPath}/carOutlets/carAllList" class="head-hover word-1">车型查询</a>
        </div>
    </div>
    <div class="layui-col-md2">
        <div class="grid-demo head-demo"><a href="${pageContext.request.contextPath}/Offline_outlets/Business_outlets.jsp" class="head-hover word-1">营业网点</a></div>
    </div>
    <%--    <div class="layui-col-md1">--%>
    <%--        <div class="grid-demo head-demo"><a href="" class="head-hover word-1">会员专区</a></div>--%>
    <%--    </div>--%>
    <div class="layui-col-md2">
        <div class="grid-demo head-demo1">
            <i class="login-icon"></i>
            <a href="${pageContext.request.contextPath}/login/login.jsp" class="head-color">登录/注册</a>
        </div>
        <div class="tel">
            <i class="tel-icon"></i>
            <span class="tel-num">110-119-1111</span>
        </div>
    </div>
</div>
<!-- 主区域 -->
<div class="main">
    <!-- 横幅 -->
    <div class="banner"></div>
    <!-- 介绍区 -->
    <div class="introduce">
        <div class="introduce-main">
            <!-- 标题文字 -->
            <div class="head-text">提供全方位长期解决方案</div>
            <!-- 优惠介绍 -->
            <div class="body-text">
                <ul>
                    <li id="first">
                        <div class="li-text">
                            <div class="li-word-h">租期灵活</div>
                            <div class="li-word-b">满足您的不同使用需求，90天-365天随意选择，租赁更随心</div>
                        </div>
                    </li>
                    <li id="second">
                        <div class="li-text">
                            <div class="li-word-h">超值优惠</div>
                            <div class="li-word-b">长租价格更优惠，尊享分期支付，轻松租赁，使用更放心</div>
                        </div>
                    </li>
                    <li id="thrid">
                        <div class="li-text">
                            <div class="li-word-h">专属服务</div>
                            <div class="li-word-b">为企业提供专属免押、资金管理、税务服务等多项尊享服务</div>
                        </div>
                    </li>
                </ul>
            </div>
            <!-- 我们的优势 -->
            <div class="head-text">我们的优势</div>
            <div class="body-text">
                <ul>
                    <li id="four">
                        <div class="youshi-text">千家网点</div>
                    </li>
                    <li id="five">
                        <div class="youshi-text">100%保障</div>
                    </li>
                    <li id="six">
                        <div class="youshi-text">无限里程</div>
                    </li>
                </ul>
                <a href="${pageContext.request.contextPath}/vehicle/vehicle_screening.jsp"><button class="order">立刻订车</button></a>
            </div>

        </div>
    </div>
</div>
<!-- 尾部 -->
<div class="footer">
    <div class="footer-box">
        <div class="footer-left">
            <p>
                <span>关于无忧</span> |
                <span>移动客户端</span> |
                <span>帮助中心</span> |
                <span>建议专区</span> |
                <span>联系我们</span> |
                <span>友情连接</span> |
                <span>投诉通道：400-821-1608</span>
            </p>
            <p>
                <span>Copyright © 2007-2022 苏州无忧信息技术服务有限公司 ICP证：苏B2-20140130|苏ICP备08010394号-1</span>
            </p>
        </div>
        <div class="footer-right"></div>
    </div>
</div>
</div>
<script>
    loadInitData();

    function loadInitData(){
        console.log("00000000000000")
        var token = localStorage.getItem("token");
        // ----->cpmtollrt toke 你=-----
        console.log("token-----:"+token)

        $.ajax({
            type: "get",
            url: "${pageContext.request.contextPath}/customer/personalData",
            headers: {"token": token},
            success: function (result) {
                console.log(result);
                var loginUser = result.data.loginCustomer;

                if(loginUser != null) {
                    $(".head-color").text(loginUser.custName);
                    $(".head-color").attr("href", "${pageContext.request.contextPath}/customer/getId/" + loginUser.custId)

                }else{
                    console.log("2222222")
                    $(".head-color").text("登录");
                    $(".head-color").attr("href", "login/login.jsp");
                }
            }
        })
    }
</script>
</body>
</html>